from selenium.webdriver.common.by import By
class  OrganizationLocator:

    #usermanagement  tab
    user_management_tab=(By.XPATH,"//div[contains(@data-menu-id,'MANAGEMENT')]/span/div")

    #organization tab
    organization_tab=(By.XPATH,"//li[contains(@data-menu-id,'ORGANIZATION_CST_LANDINGPAGE')]/span/div")

    #加载转菊花
    loading_wait=(By.CSS_SELECTOR,'[class="antd4-spin-dot antd4-spin-dot-spin"]')

    #account_email
    account_email=(By.XPATH,"//div[contains(@class,'emailName')]")

    #user_detial
    user_detial=(By.XPATH,"//nav[contains(@class,'cre-breadcrumb')]/ol/li[2]/span")

    #user_name
    user_name = (By.XPATH, "//div[contains(@class,'orgRightName')]")

    #phone_number
    phone_number=(By.XPATH,'(//span[@class="antd4-descriptions-item-content"])[3]')

    #增加下级按钮
    add_sub_deparment=(By.XPATH,"//button[contains(@class,'user-primary-button')]")

    #组织名称查询输入框
    organization_query_input=(By.XPATH,'//div[contains(@class,"leftContent")]//input[@class="antd4-input"]')

    #查询组织名称
    organization_query_button=(By.XPATH,"(//button[contains(@class,'search-button')])[1]")

    #组织名称
    org_right_name=(By.XPATH,"//div[contains(@class,'orgRightName')]")

    #不存在的组织名称
    non_existent_organization_name=(By.XPATH,"//div[contains(@class,'orgRightName')]")

    #组织成员查询框
    immediate_member_search_input=(By.ID,'creForm_searchVal')

    #查询组织名称
    immediate_member_query_button=(By.XPATH,"(//button[contains(@class,'search-button')])[2]")

    #成员的email 20240407样式修改
    #immediate_email=(By.XPATH,"//div[contains(@class,'emailName')]")
    immediate_email=(By.XPATH,'//*[@class="antd4-table-tbody"]//div[contains(@class,"emai")]//span')


    #筛选按钮
    filter=(By.XPATH,"//span[contains(@class,'table-filter-trigger')]/span")

    #筛选项_normal
    filter_normal=(By.XPATH,'(//input[@class="antd4-checkbox-input"])[1]')

    #确认选择项
    filter_ok=(By.XPATH,"//button[contains(@class,'btn-primary antd4-btn')]")

    #状态
    filter_status=(By.XPATH,"//span[contains(@class,'badge-status-text')]")

    #filter_reset_button
    filter_reset_button=(By.CSS_SELECTOR,'[class="antd4-btn antd4-btn-link antd4-btn-sm"]')

    #新增子部门名称
    sub_deparment_name=(By.ID,'creForm_name')

    #新增子部门确认按钮
    confirm_add_sub_department=(By.XPATH,"//button[contains(@class,'orgDrawerButtonOk')]")

    #新增子部门成功提示
    add_success_prompt=(By.XPATH,"//div[contains(@class,'antd4-message-success')]")

    #新增子部分名称
    sub_department_name=(By.XPATH,"//div[contains(@class,'BKxwM')]")

    #action下拉列表
    action_list=(By.XPATH,"//button[contains(@class,'dropdown-trigger')]")

    #delete删除
    action_delete=(By.XPATH,"//li[contains(@data-menu-id,'delete')]/span")

    #edit编辑
    action_edit=(By.XPATH,"//li[contains(@data-menu-id,'edit')]/span")

    #edit_confirm
    edit_confirm=(By.XPATH,"//button[contains(@class,'orgDrawerButtonOk')]")

    #编辑名称
    edit_name=(By.CSS_SELECTOR,'[id="creForm_name"]')

    #删除确认
    action_delete_confirm=(By.XPATH,"//div[contains(@class,'modal-confirm-btns')]/button[2]")

    #删除成功提示
    delete_success_prompt=(By.XPATH,"//span[contains(@class,'anticon-check-circle')]")

    #表格account
    account_email_tab=(By.XPATH,"(//th[contains(@class,'antd4-table-cell')])[1]")

    #表格status
    status=(By.XPATH,"//span[contains(@class,'menu-title-content')]/span")

    #表格user_name
    user_name_tab=(By.XPATH,"(//th[contains(@class,'antd4-table-cell')])[3]")

    # 表格phone_number
    phone_number_tab=(By.XPATH,"(//th[contains(@class,'antd4-table-cell')])[4]")

    #表格creation_time
    creation_time_tab=(By.XPATH,"(//th[contains(@class,'antd4-table-cell')])[5]")

    #表格operation
    operations=(By.XPATH,'(//ul[contains(@class,"dropdown-menu-vertical")])[2]//span')

    #operation_button
    operation_button=(By.XPATH,'//span[contains(@class,"table-operation")]')

    #operations
    operation_type=(By.XPATH,'//span[contains(@class,"antd4-dropdown-menu-title-content")]')

    #reset_pwd
    reset_pwd=(By.XPATH,'//button[contains(@class,"table-operation-btnLine-btn")]')

    #编辑组织下拉框搜索
    edit_org_input=(By.CSS_SELECTOR,'[id="creForm_orgCode"]')

    #编辑组织user组下拉框搜索
    edit_org_user_group_input=(By.CSS_SELECTOR,'[id="creForm_userGroupIdList"]')

    #默认组织选择
    edit_org_to_default=(By.CSS_SELECTOR,'[class="antd4-select-tree-title"]')

    #编辑组织确认
    edit_org_confirm=(By.XPATH,"//div[contains(@class,'modal-footer')]/button[2]")

    # edit_org_select
    edit_org_select = (By.XPATH, "//div[contains(@class,'control-input-content')]/div")

    #edit_user_group
    edit_user_group=(By.CSS_SELECTOR,'[class="antd4-select-item-option-content"]')

    # edit_org_role
    edit_org_role_select = (By.XPATH, "//div[contains(@class,'control-input-content')]/div")

    #edit_role
    def  get_edit_org_user_role(self,role_name):
        role_ele=(By.CSS_SELECTOR,'[title="%s"]'%role_name)
        return  role_ele

    # delete_org_ack
    delete_org_ack = (By.XPATH, '//div[@role="dialog"]//input/..')

    #翻页
    page_total=(By.CSS_SELECTOR,'[class="antd4-pagination-total-text"]')

    #reload_button
    reload_button=(By.CSS_SELECTOR,'[aria-label="reload"]')

    # select_choices
    select_choices = (By.CSS_SELECTOR, '[class="antd4-select-item antd4-select-item-option"]')